package com.cn.sl.server.common.model

import com.cn.sl.server.common.id.generator.GenericSnowflakeIdValue
import jakarta.persistence.EntityListeners
import jakarta.persistence.Id
import jakarta.persistence.MappedSuperclass
import org.springframework.data.jpa.domain.support.AuditingEntityListener

/**
 * 基本表结构
 *
 * @author 阮雪峰
 */
@EntityListeners(AuditingEntityListener::class)
@MappedSuperclass
open class BaseEntity {
    /**
     * 主键
     */
    @Id
    @GenericSnowflakeIdValue
    var id: Long = 0L
}